package normal.哈希表.基于列表实现;

/**
 * @author ZhuYi
 * @create 2025/1/16 23:40
 */
public class main {
    public static void main(String[] args) {
        ListHash listHash = new ListHash();

        listHash.put(1, "小朱");
        listHash.put(20, "小爽");
        listHash.put(31, "小斌");
        listHash.put(12, "小阳");
        listHash.put(90, "小徐");

        String s = listHash.get(20);
        System.out.println(s);

        listHash.remove(90);

        for (Pair bucket : listHash.getBuckets()) {
            System.out.println(bucket.key + "->" + bucket.val);
        }
        System.out.println("----------");
        for (int k : listHash.getKeys()) {
            System.out.println(k);
        }
        System.out.println("----------");
        for (String v : listHash.getValues()) {
            System.out.println(v);
        }
        System.out.println("----------");
        listHash.print();
    }
}
